<!DOCTYPE html>
<!-- saved from url=(0022) -->
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<script type="text/javascript" src="/js/jquery-2.1.1.min.js">
		</script>
		<!-- Page title -->
		<title>
			众赢国际互助 | 互助 慈善 付出 赠与
		</title>
		<!-- Place favicon.ico and apple-touch-icon.png in the root directory
		-->
		<!-- Vendor styles -->
		<link rel="stylesheet" href="/assets/vendor/fontawesome/css/font-awesome.css">
		<link rel="stylesheet" href="/assets/vendor/metisMenu/dist/metisMenu.css">
		<link rel="stylesheet" href="/assets/vendor/animate.css/animate.css">
		<link rel="stylesheet" href="/assets/vendor/bootstrap/dist/css/bootstrap.css">
		<link rel="stylesheet" href="/assets/vendor/sweetalert/lib/sweet-alert.css">
		<link rel="stylesheet" href="/assets/vendor/toastr/build/toastr.min.css">
		<!-- App styles -->
		<link rel="stylesheet" href="/assets/fonts/pe-icon-7-stroke/css/pe-icon-7-stroke.css">
		<link rel="stylesheet" href="/assets/fonts/pe-icon-7-stroke/css/helper.css">
		<link rel="stylesheet" href="/assets/styles/style.css">
		<style type="text/css">
			.jqstooltip { position: absolute;left: 0px;top: 0px;visibility: hidden;background:
			rgb(0, 0, 0) transparent;background-color: rgba(0,0,0,0.6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000,
			endColorstr=#99000000);-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000,
			endColorstr=#99000000)";color: white;font: 10px arial, san serif;text-align:
			left;white-space: nowrap;padding: 5px;border: 1px solid white;z-index:
			10000;}.jqsfield { color: white;font: 10px arial, san serif;text-align:
			left;}
		</style>
	</head>
	<body>
		<include file="User/Home/View/default/top.html" />
		<include file="User/Home/View/default/left.html" />
		<!-- Main Wrapper -->
		<div id="wrapper" style="min-height: 856px;">
			<div class="normalheader">
				<div class="hpanel">
					<div class="panel-body">
						<a class="small-header-action" href="">
							<div class="clip-header">
								<i class="fa fa-arrow-up">
								</i>
							</div>
						</a>
						<div id="hbreadcrumb" class="pull-right m-t-lg">
							<ol class="hbreadcrumb breadcrumb">
								<li>
									<a href="">
										首页
									</a>
								</li>
								<li class="active">
									<span>
										<a>
											审核注册人
										</a>
									</span>
								</li>
							</ol>
						</div>
						<h2 class="font-light m-b-xs">
							审核注册人
						</h2>
						<!--
						<form name="form1" method="post" action="/Home/Index/jbzzcl/">
							<label>
								激活码转让,数量:
								<input name="sh" type="text" id="sh">
							</label>
							<label>
								对方用户名:
								<input name="user" type="text" id="user">
								<font id="alert_pemail">
								</font>
								<input type="button" id="jhwjjc" name="Submit2" value="检查">
							</label>
							<!-- <label>
							二级密码:
							<input name="ejmm" type="password" id="ejmm">
							</label>- ->
							<label>
								<input type="submit" name="Submit" value="确认转让">
							</label>
							<br>
							<span>
								当前可用激活码数量{$pin_zs}
							</span>
						</form>
						<script>
							$(function() {

								$('#jhwjjc').click(function() {

									var $dfzh = $('#user').val();
									var $action = '/Home/Myuser/xm';

									//alert($action);
									$.post($action, {
										dfzh: $dfzh
									},
									function(data) {
										//alert("asdf");
										if (data.sf == 0) {
											document.getElementById('alert_pemail').innerHTML = data.nr;
											//alert(data.nr);
										} else {
											//alert(data);
											document.getElementById('alert_pemail').innerHTML = data;
										}
									});

								});

							})
						</script>
						-->
					</div>
				</div>
			</div>
			<div class="content">
				<!--table-->
				<div class="row">
					<div class="col-lg-12">
						<div class="col-md-12">
							<div class="hpanel">
								<div class="panel-heading">
									<div class="panel-tools">
										<a class="showhide">
											<i class="fa fa-chevron-up">
											</i>
										</a>
										<a class="closebox">
											<i class="fa fa-times">
											</i>
										</a>
									</div>
									This is a bordered striped and responsive table
								</div>
								<div class="panel-body">
									<div class="table-responsive">
										<div id="example_wrapper" class="dataTables_wrapper no-footer">
											<div class="dataTables_length" id="example_length">
												<label>
												</label>
											</div>
											<!-- users -->
											<table id="example" cellpadding="1" cellspacing="1" class="table table-bordered table-striped cus_datatable dataTable no-footer"
											width="100%" role="grid" aria-describedby="example_info" style="width: 100%;">
												<thead>
													<tr role="row">
														<th class="sorting_desc" tabindex="0" aria-controls="example" rowspan="1"
														colspan="1" aria-sort="descending" aria-label="编号: activate to sort column ascending"
														style="width: 103px;">
															编号
														</th>
														
														<th class="sorting" tabindex="0" aria-controls="example" rowspan="1" colspan="1"
														aria-label="用户: activate to sort column ascending" style="width: 103px;">
															用户邮箱
														</th>
														
														<th class="sorting" tabindex="0" aria-controls="example" rowspan="1" colspan="1"
														aria-label="PIN码: activate to sort column ascending" style="width: 120px;">
															激活码
														</th>
														
														<th class="sorting" tabindex="0" aria-controls="example" rowspan="1" colspan="1"
														aria-label="状态: activate to sort column ascending" style="width: 103px;">
															状态
														</th>
														
														<th class="sorting" tabindex="0" aria-controls="example" rowspan="1" colspan="1"
														aria-label="生成时间: activate to sort column ascending" style="width: 164px;">
															注册时间
														</th>
														
														<th class="sorting" tabindex="0" aria-controls="example" rowspan="1" colspan="1"
														aria-label="操作: activate to sort column ascending" style="width: 104px;">
															操作
														</th>
													</tr>
												</thead>
												<tbody>
													<foreach name='users' item='vo'>
														<tr role="row" class="odd">
															<td class="sorting_1">
																{$vo.ue_id}
															</td>
															<td>
																{$vo.ue_account}
															</td>
															<td>
																<?php if( !isset( $vo['pin'] ) ){ ?>
																未指定
																<?php } else { ?>
																{$vo.pin}
																<?php } ?>
															</td>
															<td>
																<?php if( $vo['ue_status'] == 0 ){ ?>
																<span style="color:green;">正常</span>
																<?php } else if( $vo['ue_status'] == 1 ){ ?>
																<span style="color:red;">禁用</span>
																<?php } else if( $vo['ue_status'] == 2 ){ ?>
																<span style="color:red;">尚未审核</span>
																<?php } ?>
															</td>
															<td>{$vo.ue_regtime}</td>
															<td>
																<?php if( $vo['ue_status'] == 0 ){ ?>
																<a href="{:U('Home/RegHub/disable_user')}?id={$vo.ue_id}">禁用</a>
																<?php } ?>
																<?php if( $vo['ue_status'] == 1 ){ ?>
																<a href="{:U('Home/RegHub/enable_user')}?id={$vo.ue_id}">启用</a>
																<?php } ?>
																<?php if( $vo['ue_status'] == 2 || !strlen( $vo['pin'] ) ){ ?>
																<div style="display:none;" id="pin-{$vo.ue_id}"><input id="pin-{$vo.ue_id}" style="width:100%;" /><br/></div>
																<a id="censor-{$vo.ue_id}" href="javascript: void(0);">通过审核</a>
																<div style="display:none;" id="confirm-{$vo.ue_id}">
																	<a id="get-pin-{$vo.ue_id}" data-uid="{$vo.ue_id}" href="javascript: void(0);">获取PIN</a>&nbsp;|&nbsp;
																	<a id="confirm-censor-{$vo.ue_id}" data-uid="{$vo.ue_id}" href="javascript: void(0);">确认</a>
																</div>
																<script>
																$(document).ready(function(){
																	$('#censor-{$vo.ue_id}').click(function(){
																		$('#pin-{$vo.ue_id}').show();
																		$('#censor-{$vo.ue_id}').hide();
																		$('#confirm-{$vo.ue_id}').show();
																	});
																	$('#get-pin-{$vo.ue_id}').click(function(){
																		//console.log( $(this).attr('data-uid') );
																		var id = $(this).attr('data-uid');
																		$.get("{:U( '/Home/RegHub/get_pin' )}", function( data ){
																			data = eval( '('+data+')' );
																			console.log(data);
																			console.log(id);
																			if( data.id > 0 ){
																				$('input#pin-'+id).val(data.pin);
																			} else {
																				alert( '请联系客服' );
																			}
																		});
																	});
																	
																	$('#confirm-censor-{$vo.ue_id}').click(function(){
																		var id = $(this).attr('data-uid');
																		var pin = $('input#pin-'+id).val();
																		if( pin.length > 0 ){
																			window.location.href = "http://{:I('server.HTTP_HOST');}{:U( '/Home/RegHub/confirm_censor' );}?id="+id+"&pin="+pin;
																		} else {
																			alert( '请先点击“获取PIN”' );
																		}
																	});
																});
																</script>
																<?php } ?>
															</td>
													</foreach>
												</tbody>
											</table>
											<table id="example" cellpadding="1" cellspacing="1" class="table table-bordered table-striped cus_datatable dataTable no-footer"
											width="100%" role="grid" aria-describedby="example_info" style="width: 100%;">
												<thead>
													<tr role="row">
														<th class="sorting_desc" tabindex="0" aria-controls="example" rowspan="1"
														colspan="1" aria-sort="descending" aria-label="编号: activate to sort column ascending"
														style="width: 103px;">
															编号
														</th>
														<th class="sorting" tabindex="0" aria-controls="example" rowspan="1" colspan="1"
														aria-label="用户: activate to sort column ascending" style="width: 103px;">
															用户
														</th>
														<th class="sorting" tabindex="0" aria-controls="example" rowspan="1" colspan="1"
														aria-label="PIN码: activate to sort column ascending" style="width: 120px;">
															激活码
														</th>
														<th class="sorting" tabindex="0" aria-controls="example" rowspan="1" colspan="1"
														aria-label="状态: activate to sort column ascending" style="width: 103px;">
															状态
														</th>
														<th class="sorting" tabindex="0" aria-controls="example" rowspan="1" colspan="1"
														aria-label="生成时间: activate to sort column ascending" style="width: 164px;">
															生成时间
														</th>
														<th class="sorting_disabled" rowspan="1" colspan="1" aria-label="使用用户"
														style="width: 164px;">
															使用用户
														</th>
														<th class="sorting_disabled" rowspan="1" colspan="1" aria-label="使用时间"
														style="width: 164px;">
															使用时间
														</th>
														<th class="sorting" tabindex="0" aria-controls="example" rowspan="1" colspan="1"
														aria-label="操作: activate to sort column ascending" style="width: 104px;">
															操作
														</th>
													</tr>
												</thead>
												<tbody>
													<foreach name='list1' item='v'>
														<tr role="row" class="odd">
															<td class="sorting_1">
																{$v.id}
															</td>
															<td>
																{$v.user}
															</td>
															<td>
																{$v.pin}
															</td>
															<td>
																<if condition="$v.zt eq '0'">
																	未使用
																</if>
																<if condition="$v.zt eq '1'">
																	已使用
																</if>
															</td>
															<td>
																{$v.sc_date}
															</td>
															<td>
																{$v.sy_user}
															</td>
															<td>
																{$v.sy_date}
															</td>
															<td>
															</td>
														</tr>
													</foreach>
												</tbody>
											</table>
											<div class="dataTables_paginate paging_simple_numbers" id="example_paginate">
												{$page1}
											</div>
										</div>
									</div>
								</div>
								<div class="panel-footer">
									Table - 6 rows
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!--table end-->
		</div>
		<!--gethelp modal end-->
		<script src="/cssmmm/jquery.min.js">
		</script>
		<script src="/cssmmm/jquery-ui.min.js">
		</script>
		<script src="/cssmmm/jquery.slimscroll.min.js">
		</script>
		<script src="/cssmmm/bootstrap.min.js">
		</script>
		<script src="/cssmmm/jquery.flot.js">
		</script>
		<script src="/cssmmm/jquery.flot.resize.js">
		</script>
		<script src="/cssmmm/jquery.flot.pie.js">
		</script>
		<script src="/cssmmm/curvedLines.js">
		</script>
		<script src="/cssmmm/index.js">
		</script>
		<script src="/cssmmm/metisMenu.min.js">
		</script>
		<script src="/cssmmm/icheck.min.js">
		</script>
		<script src="/cssmmm/jquery.peity.min.js">
		</script>
		<script src="/cssmmm/index(1).js">
		</script>
		<script src="/cssmmm/sweet-alert.min.js">
		</script>
		<script src="/cssmmm/toastr.min.js">
		</script>
		<script src="/cssmmm/jquery.countdown.min.js">
		</script>
		<!-- App scripts -->
		<script src="/cssmmm/homer.js">
		</script>
		<script src="/cssmmm/alert.js">
		</script>
		<script src="/cssmmm/charts.js">
		</script>
		<script type="text/javascript" src="/cssmmm/socket.io.js">
		</script>
		<script>
		</script>
		<script>
			$(function() {

				$('.time_countdown').each(function() {
					var $this = $(this);
					var time = $this.data('time') + '';

					var y = time.split(' ');
					var ys = y[0].split('-');

					var sd = y[1].split(':');

					for (var i = 0; i < sd.length; i++) {
						ys.push(sd[i]);
					};

					console.log(ys);

					var datez = new Date(ys[0], ys[1], ys[2], ys[3], ys[4], ys[5]).getTime();
					//datez = datez+172800000;
					var date = new Date(datez);
					Y = date.getFullYear() + '/';
					M = date.getMonth() + '/';
					D = date.getDate() + ' ';
					h = date.getHours() + ':';
					m = date.getMinutes() + ':';
					s = date.getSeconds();

					dates = Y + M + D + h + m + s;
					console.log(Y + M + D + h + m + s + '.......');

					$this.countdown(dates,
					function(event) {

						$(this).text(event.strftime('%-D 天 %-H 小时 %M 分钟 %S 秒'));
					});

					datez = null;
				});

				$("#canyuzhi").change(function() {

					//alert($(this).val());
					$("#regs").submit();

				});

				var $from = null;

				$(".cancel").click(function() {
					$from = $(this).parents().eq(0);

					$div = $(this).parents().eq(2);

					//$("#myModa31").modal('toggle');
					var order_id = $(this).data('id');

					swal({
						title: "您确定要取消吗？",
						text: "",
						type: "warning",
						showCancelButton: true,
						confirmButtonColor: "#DD6B55",
						confirmButtonText: "是的，我要取消",
						cancelButtonText: "不，我不取消",
						closeOnConfirm: false,
						closeOnCancel: true
					},
					function(isConfirm) {
						if (isConfirm) {
							$.post('/tu/cancel_provide_request', {
								order_id: order_id
							},
							function(data) {
								if (data) {
									swal("已取消", "取消成功.", "success");
									$div.remove();
								}
							});

						} else {
							swal("", "", "error");
						}
					});

				});

				$(".cancel2").click(function() {
					$from = $(this).parents().eq(0);
					$div = $(this).parents().eq(2);

					//$("#myModa31").modal('toggle');
					var order_id = $(this).data('id');

					swal({
						title: "您确定要取消吗？",
						text: "",
						type: "warning",
						showCancelButton: true,
						confirmButtonColor: "#DD6B55",
						confirmButtonText: "是的，我要取消",
						cancelButtonText: "不，我不取消",
						closeOnConfirm: false,
						closeOnCancel: true
					},
					function(isConfirm) {
						if (isConfirm) {
							$.post('/tu/cancel_get_request', {
								order_id: order_id
							},
							function(data) {
								if (data) {
									swal("已取消", "取消成功.", "success");
									$div.remove();
								}
							});

						} else {
							swal("", "", "error");
						}
					});

				});

				$("#yes_cancel").click(function() {

					console.log($from);

					$("#wait").submit();
					//$from.submit();
				});

				/*$("#next32").click(function(){
                $("#myModa32").modal('toggle');
            });
            
            $("#next30").click(function(){
                $("#myModa30").modal('toggle');
            });*/

				$(".btngethelp").click(function() {
					$(".balance").val($(this).data("cp"));
					$(".sell").val($(this).data("cp"));
					$(".get_amount").val("");
					$("#wallet_type").val($(this).data("wallet_type"));
					$("#gethelpmodal").modal("toggle");
				});
				$(".get_amount").bind("change",
				function() {
					if (isNaN($(this).val())) {
						$(this).val(0);
					}
					var ths = $(this).val();
					var mat = Math.floor(ths / 10);
					$(this).val(mat * 10);
					var amount = mat * 10;
					var cp = parseInt($(".balance").val());
					var maxx = parseInt("2000");
					var min = parseInt("100");
					var getvalue = amount * 7;
					$("#gh_amount").text(amount);
					$("#gh").text(getvalue);
					if (amount <= cp && amount <= maxx && amount >= min) {
						$("#gh_amount").css("color", "#00FF00");
						$("#gh").css("color", "#00FF00");
						$('.btnconfirm').removeAttr("disabled");
					} else {
						$('.btnconfirm').attr('disabled', "true");
						$("#gh_amount").css("color", "red");
						$("#gh").css("color", "red");
					}
					$("#amount_get").text(getvalue);
				});
				$(".btn_get_next").click(function() {
					//alert("ss");
					var sstr = '';
					$('.ckbox2').each(function(index, element) {
						if ($(this).prop('checked')) {
							sstr += $(this).val() + ',';
						}
					});
					$("#payment_method2").val(sstr);
					$("#get_help").submit();
					//alert(1);
				});

				$("#select_fanshi").click(function() {

					var id = $("#comid").val();
					var status = $('.comfir:checked').val();

					$.post('/tu/updateStatus', {
						status: status,
						id: id
					},
					function(data) {

						if (data != 0) {

							alert('操作成功!');
							window.location.reload();
						} else {
							alert('操作失败!');
							window.location.reload();

						}

					});

				});

				$("#select_fanshi2").click(function() {

					var id = $("#completid").val();

					var status = $('.comfir2:checked').val();

					$("#pro_status").val(status);

					if (status == 1) {
						$("#myModa25").modal('toggle');
					} else {

						$.post('/tu/cancel', {
							provide_status: status,
							id: id
						},
						function(data) {

							if (data != 0) {

								alert('操作成功');
								window.location.reload();
							} else {
								alert('操作失败');
								window.location.reload();
							}

						});

					}

				});

				$("#select_fanshi3").click(function() {

					var id = $("#completid").val();

					$("#myModa25").modal('close');

				});

				$('input:checkbox').each(function() {

					if ($(this).attr('checked') == true) {
						alert($(this).val());
					}
				});
				$(".addmsg").click(function() {

					var id = $(this).data('id');
					$("#orderid").text(id);

					$.post('/tu/showMsg', {
						id: id
					},
					function(data) {

						var html = [];
						var htmlstr = null;

						console.log(eval(data));

						var data = eval(data);

						if (data) {
							for (var i = 0,
							len = data.length; i < len; i++) {

								html.push('<p>' + data[i].time + ' , ' + data[i].lid + '</p>');

								html.push('<p>' + data[i].context + '</p>');

							}
							htmlstr = html.join('');
							$("#msg").html(htmlstr);
						} else {
							$("#msg").html('');
						}

					});

					$("#id").val($(this).data('id'));

					$("#mesg").focus();

				});

				$('.btn_next').click(function() {
					var str = '';
					$('.ckbox').each(function(index, element) {
						if ($(this).prop('checked')) {
							str += $(this).val() + ',';
						}
					});

					$("#payment_method").val(str);

					var amount = $("#amount").val();
					$("#amountpay").text(amount * 7);
				});

				$('.btnNext').click(function() {
					$("#provide_help").submit();
				});
				$(".btn_detail").click(function() {

					$("#expire_date").text($(this).data("expire_date"));
					$("#bank_number").text($(this).data("bank_number"));
					$("#bank_user").text($(this).data("bank_user"));
					$("#bank_name").text($(this).data("bank_name"));

					$("#wechat").text($(this).data("wechat"));

					$("#alipay").text($(this).data("alipay"));

					$("#order_id").text($(this).data('id'));
					$(".receiver_phone").text($(this).data("receiver_phone"));
					$("#sender_phone").text($(this).data("sender_phone"));
					$("#sender_lid").text($(this).data("sender_lid"));
					$("#receiver_lid").text($(this).data("receiver_lid"));
					$(".receiver_wechat_contact").text($(this).data("receiver_wechat_contact"));
					$("#amount_order").text($(this).data('amount_order'));
					$("#sender_wechat_contact").text($(this).data("sender_wechat_contact"));
					$("#sender_manager_lid").text($(this).data('sender_manager_lid'));
					$("#sender_manager_phone").text($(this).data('sender_manager_phone'));
					$("#sender_manager_wechat_contact").text($(this).data('sender_manager_wechat_contact'));
					$("#receiver_manager_lid").text($(this).data('receiver_manager_lid'));
					$("#receiver_manager_phone").text($(this).data('receiver_manager_phone'));
					$(".receiver_manager_wechat_contact").text($(this).data('receiver_manager_wechat_contact'));

				});

				$(".provide_complete").click(function() {

					$("#expire_date2").text($(this).data("expire_date"));
					$("#bank_number2").text($(this).data("bank_number"));
					$("#bank_user2").text($(this).data("bank_user"));
					$("#bank_name2").text($(this).data("bank_name"));
					$("#mavro").text($(this).data('mavro'));
					$("#rmb").text(Number($(this).data('mavro')) * 7);
					$("#comid").val($(this).data('id'));

				});

				$(".complete").click(function() {

					$("#completid").val($(this).data('id'));

				});

				var selec = $("#amount").val();
				var tt = selec * 7;
				$("#select").text(selec);
				$("#pay").text(tt);
				$("#amount").bind("change",
				function() {
					$("#select").text($("#amount").val());
					$("#pay").text($("#amount").val() * 7);
				});

				$("#ad").height($("#aa").css('height'));
				$("#bd").height($("#ba").css('height'));
				$("#cc").height($("#ca").css('height'));
			});

			//js timestamp -- data
			function formatDate(timestamp, accuracy) {
				var time = new Date(timestamp);
				var year = time.getFullYear();
				var month = time.getMonth() + 1;
				var date = time.getDate();
				var hour = time.getHours();
				var minute = time.getMinutes();
				var second = time.getSeconds();
				var result = "";

				switch (accuracy) {
				case "year":
					{
						result = year;
					}
					break;
				case "month":
					{
						result = year + "-" + month;
					}
					break;
				case "day":
					{
						result = year + "-" + month + "-" + date;
					}
					break;
				case "hour":
					{
						result = year + "-" + month + "-" + date + " " + hour + ":00";
					}
					break;
				case "minute":
					{
						result = year + "-" + month + "-" + date + " " + hour + ":" + minute;
					}
					break;
				case "second":
					{
						result = year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second;
					}
					break;
				default:
					break;
				}
				return result;
			}

			try {
				var socket = io('http://174.139.194.157:1338');
			} catch(err) {
				console.log('server errr');
			}
			var $show = $("#show");

			var $total = $("#total");

			socket.on('num',
			function(data) {

				$total.html(data.num);

			});

			socket.on('show',
			function(data) {
				console.log(data);

				$total.html(data.num);

				var reallen = $show.find('div').length;

				if (reallen > 500) {

					$show.find('div').last().remove();

				}

				$show.prepend('<div><span>' + formatDate(Number(data.data.add_time) * 1000, 'second') + '   </span><span>   ' + data.data.city + ' 的会员做了一次操作</span></div>');

			});
		</script>
	</body>

</html>